import { DATA_TYPE_TEXT, DATA_TYPE_RADIO_GROUP, DATA_TYPE_LABEL } from '@/components/Custom/CommonDialog/Constant'

export default {
  data() {
    return {
      orderAuditDialogVisible: false,
      orderAuditDialogConfig: {
        dialogProps: {
          title: '订单审核',
          width: '500px'
        },
        formItemList: [
          {
            label: '订单编号',
            prop: 'goodsOptCode',
            type: DATA_TYPE_LABEL,
            defaultValue: (curItem) => {
              return curItem.goodsOptCode
            }
          },
          {
            label: '订单审核',
            prop: 'status',
            type: DATA_TYPE_RADIO_GROUP,
            enumMap: { 30: '审核不通过', 20: '审核通过' }
            // rules: [
            //   { required: true, message: '请选择订单审核', trigger: 'change' }
            // ]
          },
          {
            label: '反馈详情',
            prop: 'remark',
            type: DATA_TYPE_TEXT
            // rules: [
            //   { required: true, message: '反馈详情', trigger: 'blur' },
            //   { max: 1000, message: '长度1000字符', trigger: 'blur' }
            // ]
          }
        ],
        rules: {
          remark: [
            { required: true, message: '请输入反馈详情', trigger: 'blur' },
            { max: 1000, message: '长度1000字符', trigger: 'blur' }
          ],
          status: [
            { required: true, message: '请选择订单审核', trigger: 'change' }
          ]
        }
      },
      orderAuditRuleForm: {
        remark: '',
        status: ''
      }
    }
  }
}
